
************************************************************************
* Replication material for "The Social Dynamics of Collective Action:  *
* Evidence from the Diffusion of the Swing Riots, 1830-31"             *
*                                                                      *
* Aidt, Leon and Satchell (2020)                                       *
************************************************************************


********************************************************
* This file produces Figure A1 in the online appendix: *
* "Distribution of distances to newspapers"            *
********************************************************

clear
sysdir set PERSONAL "C:\Users\k1466170\Documents\ado"
sysdir set PLUS "C:\Users\k1466170\Documents\ado"

use "newspaper_distribution.dta"

* Set plotting scheme
set scheme plotplainblind

twoway kdensity news_dist if allriotsX==1, lpattern(dash)  || kdensity news_dist if allriotsX>0


kdensity news_dist, nograph generate(x fx)
kdensity news_dist if allriotsX==0, nograph generate(fx0) at(x)
kdensity news_dist if allriotsX>1, nograph generate(fx1) at(x)
label var fx0 "no riots"
label var fx1 "riots"
line fx0 fx1 x, sort ytitle(Density) xtitle(Distance to nearest newspaper)